The present invention relates generally to stepper motor control systems for controlling the manner in which a stepper motor is energized and, more particularly, to a stepper motor control system and method in which step mode control data may be integrated into one or more entries of a stored table of time data.
Stepper motors are commonly used in devices such as desktop printers for a variety of purposes, including the feed of paper through the printer and the movement of a print head carriage across a paper path. Control of such stepper motors to achieve desired print quality and speed continues to be a critical issue. Prior art stepper motor control systems that operate under microprocessor control are well known. Also known are systems that do not require microprocessor intervention. Both types of systems may commonly utilize both time tables (tables storing time data for defining the time between motor steps), energization tables (tables storing motor phase energization data), or combinations of the same.
For example, U.S. Pat. No. 3,986,094 discloses a stepper motor control system in which multiple stepper motor movement sequences are stored in ROM in the form of motor phase energization data and time data records or entries. To achieve a particular stepper motor movement, a ROM address is defined as a starting point and is loaded into a four bit counter associated with the ROM. Phase energization data and time data are output from the ROM location corresponding to the loaded address. The phase energization data is sent to the stepper motor drivers and the time data is loaded into a timer and a count is initiated. When the count is completed, the timer outputs a trigger signal which causes the four bit counter to increment by one, causing the entry in the next sequential address of ROM to be output. This sequence is continued until the end of the desired stepper motor movement is achieved, and no microprocessor intervention is required. In this system, numerous sets of phase energization and time data are stored in ROM, each set defining a given stepper motor movement operation.
U.S. Pat. No. 5,574,351 operates in a manner similar to U.S. Pat. No. 3,986,094. In particular, U.S. Pat. No. 5,574,351 discloses a stepper motor control system in which multiple step tables and multiple time tables (acceleration tables) are stored in memory. A first DMA channel is provided for accessing step table data and a second DMA channel is provided for accessing time table data. Time data retrieved from the time table is loaded into a timer and a count is initiated. At the conclusion of the count the timer generates a trigger signal which is sent to the DMA channel controllers causing next step data and time data to be sequentially retrieved via the DMA channels.
Neither U.S. Pat. No. 3,986,094 nor U.S. Pat. No. 5,574,351 discloses the storing of step mode control data in combination with time data in a single table. Accordingly, in such patents separate tables need to be provided for given stepper motor movement operations, resulting in decreased system flexibility.
Accordingly, it would be advantageous to provide an improved stepper motor control system.
In one aspect, a method for controlling a stepper motor involves: (a) storing a motor movement table having a plurality of entries, a multiplicity of said entries storing step mode selection data, time data, and energization table selection data; (b) providing at least two stored motor energization tables; (c) retrieving from said motor movement table a first entry; (d) initiating a count according to time data of the first entry; (e) after conclusion of the count of step (d), and based in part upon the step mode selection data of the first entry, establishing move control data for defining a desired next state; (f) based at least in part upon the move control data established in step (e), establishing an energization table index value corresponding to the desired next state; and (g) accessing a motor energization table corresponding to the table selection data of the first entry, and outputting from the accessed table motor energization control data corresponding to the energization table index value of step (f).
In another aspect, a method for controlling a stepper motor involves: (a) storing a motor movement table having a plurality of entries, a multiplicity of said entries storing step mode selection data, first time data, and second time data; (b) retrieving from said motor movement table a first entry; (c) initiating a first count according to the first time data of the first entry; (d) after the first count is concluded, and based in part upon the step mode selection data of the first entry, establishing first move control data indicative of a first desired next state; (e) based at least in part upon the first move control data, establishing a first table index value corresponding to the first desired next state; (f) accessing a motor energization table and outputting from the accessed table first motor energization control data corresponding to the first table index value; (g) after the first count is concluded, initiating a second count according to the second time data of the first entry; (h) after the second count is concluded, and based in part upon the step mode selection data of the first entry, establishing second move control data indicative of a second desired next state; (i) based at least in part upon the second move control data, establishing a second table index value corresponding to the second desired next state; (j) accessing the motor energization table and outputting from the accessed table second motor energization control data corresponding to the second table index value.
In a further aspect, a method for controlling a stepper involves: (a) storing a motor movement table having a plurality of entries, a multiplicity of said entries storing both first time data and second time data; (b) retrieving from said motor movement table a first entry; (c) initiating a first count according to the first time data of the first entry; (d) after the first count is concluded, outputting first motor energization control data; (e) after the first count is concluded, initiating a second count according to the second time date of the first entry; (f) after the second count is concluded, outputting second motor energization control data; (g) after step (b), determining whether the first time data represents a full count and, if so, skipping step (d).
In still a further aspect, a paper feed system for a printer includes a paper feed roller and a stepper motor operatively connected for effecting rotation of the paper feed roller. A stepper motor control system includes memory, a digital control block and a digital state machine. The memory stores a motor movement table having a plurality of entries, a multiplicity of the entries storing step mode selection data, first time data, second time data, detent control data, and energization table selection data. The digital control block includes a buffer for receiving a retrieved entry from the motor movement table, a counter for receiving time data from the retrieved entry in the buffer and initiating a count operation, and at least two motor energization tables stored in ASIC registers for outputting motor energization control data. The digital state machine outputs an energization table index value to the digital control block in a controlled manner. The digital control block includes an output for delivering, upon conclusion of the count operation, and based in part upon the step mode selection data and detent control data of the retrieved entry, move control data to the digital state machine for defining a desired next state, the move control data including step mode data and direction data. In response to receipt of the move control data the digital state machine outputs a next state index value to the digital control block. In response to receipt of the next state index value the digital control block accesses a motor energization table corresponding to the table selection data of the retrieved entry, and outputs motor energization control data corresponding to the next state table index value.
In another aspect, a paper feed system for a printer includes a paper feed roller and a stepper motor operatively connected for effecting rotation of the paper feed roller. A stepper motor control system includes memory and a controller. The memory stores a motor movement table having a plurality of entries, a multiplicity of said entries storing at least step mode selection data, time data, detent control data, and energization table selection data. The controller is operable to access the motor movement table and initiate a count based upon the time data of a retrieved entry. The controller is further operable upon completion of the count to establish an energization table index value based at least in part on the step mode selection data of the retrieved entry. The controller is also operable to access an energization table corresponding to the energization table selection data of the retrieved entry. The controller outputs motor energization control data from the accessed energization table in accordance with the energization table index value.